
import datetime

class Work:
    def __init__(self):
        pass

    def activity(self, person, time):
        if time.weekday() == 5 or time.weekday() == 6:
            endTime =  datetime.datetime(time.year, time.month, time.day + 1, 0, 0, 0)
            return (0.0, endTime)
        if time.hour < 9:
            endTime =  datetime.datetime(time.year, time.month, time.day, 9, 0, 0)
            return (0.0, endTime)
        if time.hour > 16:
            endTime =  datetime.datetime(time.year, time.month, time.day + 1, 0, 0, 0)
            return (0.0, endTime)
        endTime =  datetime.datetime(time.year, time.month, time.day, 17, 0, 0)
        return (1.0, endTime)

